-
Notifications
You must be signed in to change notification settings - Fork 187
Clarify linear scaling in ImageDataProvider contract #2391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify linear scaling in ImageDataProvider contract #2391
Conversation
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me. I only have one comment regarding the system property usage on Linux/GTK.
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
Outdated
Show resolved
Hide resolved
d1d3862 to
fdb2dc7
Compare
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks fine now.
I just have one proposal: instead of adding this constant that can be used from everywhere, we might encapsulate it (make it private) and provide methods like runIfStrictChecksEnabled(Runnable) and runWithStrictChecksDisabled(Runnable) that represent the two use cases we currently have in consumers code. And maybe we could do that in a separate PR (preparatory for the contract improval), so that we have the two changes (improvement of strict checks and contract improvement) separated.
bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/SWTInternalConstants.java
Outdated
Show resolved
Hide resolved
fdb2dc7 to
8536d7b
Compare
Have made the refactoring of strictchecks to another PR #2410. This PR now only has the contract extension |
8536d7b to
7ed834d
Compare
Clarify in the contract that ImageDataProvider implementations are expected to return linearly scaled ImageData based on the zoom level.
7ed834d to
ac26789
Compare
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sound good, thank you!
I just simplified the commit message as it still referred to the modification of strict checks which has been extracted to #2410
This PR extends ImageDataProvider contract to clarify that implementations need to yield linearly scaled image data.
This commit also extends the strict checks for verifying linear scaling to GTK and Cocoa implementations.